home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
DEMON
/
LANGUAGE
/
POTSRC.ARC
/
src
/
c
/
COCQ
< prev
next >
Wrap
Text File
|
1995-05-06
|
8KB
|
296 lines
/* This code is generated by pOt. */
#include <pOtRTL.h>
#include "Strings.h"
#include "COCS.h"
#include "COCT.h"
#include "COCO.h"
#include "hi.COCQ"
struct pOt__tag_0_COCQ {
pOt__ArrTypDsc *td;
pOt_CHAR arr[0x1000L];
} ;
pOt__ArrTypDsc pOt__td_0_COCQ= {
1,
0x1000L, sizeof(pOt_CHAR)
};
static struct pOt__tag_0_COCQ pOt_CSeq_COCQ, pOt_Dup_COCQ;
pOt_INTEGER pOt_cslen_COCQ;
static struct {void *next, *vars[0x1];} pOt__gc_ptrs = {pOt_NIL,{
pOt_NIL
}};
static struct {void *next, *vars[0x1];} pOt__gc_strs = {&pOt__gc_ptrs,{
pOt_NIL
}};
extern void pOt_Append_COCQ
#if pOt__ANSI_C
(pOt__DynArr *pOt_sfx)
#else
(pOt_sfx)
pOt__DynArr *pOt_sfx;
#endif
{
pOt_INTEGER pOt_i, pOt_sfxlen;
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt_sfxlen=(pOt_INTEGER)((pOt_LONGINT)pOt__rngchk_i(__FILE__,__LINE__,pOt_Length_Strings(pOt__dup_arr(__FILE__,__LINE__,(pOt__ArrTypDsc**)&(*pOt_sfx)))));
if(( (pOt_INTEGER)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_sfxlen),(pOt_LONGINT)(pOt_cslen_COCQ),5)>4095)) {
pOt_Mark_COCS((pOt_INTEGER)(215));
goto pOt__Epilogue;
}
pOt_i=(pOt_INTEGER)(0);
for(;;) {
pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, (pOt_INTEGER)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_i),(pOt_LONGINT)(pOt_cslen_COCQ),5))]=(*((pOt_CHAR*)(((char *)pOt_sfx+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_sfx))->nofel,pOt_i)))));
if(( pOt_i==pOt_sfxlen)) {
goto pOt__LoopLabel_1;
}
pOt_i+=(1);
}
pOt__LoopLabel_1:;
pOt_cslen_COCQ+=(pOt_sfxlen);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
pOt__rm_par((pOt__TypDsc**)pOt_sfx);
}
extern void pOt_Prepend_COCQ
#if pOt__ANSI_C
(pOt__DynArr *pOt_pfx, pOt_INTEGER pOt_pos, pOt_INTEGER *pOt_nextpos)
#else
(pOt_pfx, pOt_pos, pOt_nextpos)
pOt__DynArr *pOt_pfx;
pOt_INTEGER pOt_pos, *pOt_nextpos;
#endif
{
pOt_INTEGER pOt_i, pOt_pfxlen;
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
if(( pOt_pos==pOt_cslen_COCQ)) {
pOt_Append_COCQ(pOt__dup_arr(__FILE__,__LINE__,(pOt__ArrTypDsc**)&(*pOt_pfx)));
(*pOt_nextpos)=(pOt_INTEGER)(pOt_cslen_COCQ);
goto pOt__Epilogue;
}
pOt_pfxlen=(pOt_INTEGER)((pOt_LONGINT)pOt__rngchk_i(__FILE__,__LINE__,pOt_Length_Strings(pOt__dup_arr(__FILE__,__LINE__,(pOt__ArrTypDsc**)&(*pOt_pfx)))));
if(( (pOt_INTEGER)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_pfxlen),(pOt_LONGINT)(pOt_cslen_COCQ),5)>4095)) {
pOt_Mark_COCS((pOt_INTEGER)(215));
pOt_i=(pOt_INTEGER)(pOt_pos);
} else {
pOt_i=(pOt_INTEGER)((pOt_INTEGER)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_cslen_COCQ),(pOt_LONGINT)(1),5));
for(;;) {
if(( pOt_i!=pOt_pos)); else break;
pOt_i-=(1);
pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, (pOt_INTEGER)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_i),(pOt_LONGINT)(pOt_pfxlen),5))]=pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, pOt_i)];
}
for(;;) {
if(( pOt_i!=(pOt_INTEGER)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_pos),(pOt_LONGINT)(pOt_pfxlen),5))); else break;
pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, pOt_i)]=(*((pOt_CHAR*)(((char *)pOt_pfx+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_pfx))->nofel,(pOt_INTEGER)pOt__subchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_i),(pOt_LONGINT)(pOt_pos),5))))));
pOt_i+=(1);
}
pOt_cslen_COCQ+=(pOt_pfxlen);
}
(*pOt_nextpos)=(pOt_INTEGER)(pOt_i);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
pOt__rm_par((pOt__TypDsc**)pOt_pfx);
}
extern void pOt_Rewind_COCQ()
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, 0)]='\0';
pOt_cslen_COCQ=(pOt_INTEGER)(0);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Drop_COCQ
#if pOt__ANSI_C
(struct pOt__tag_3_COCT *pOt_x)
#else
(pOt_x)
struct pOt__tag_3_COCT *pOt_x;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt_cslen_COCQ=(pOt_INTEGER)((*pOt_x).pOt_qoffs);
pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, pOt_cslen_COCQ)]='\0';
(*pOt_x).pOt_qoffs=(pOt_INTEGER)(-1);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Link_COCQ
#if pOt__ANSI_C
(struct pOt__tag_3_COCT *pOt_x)
#else
(pOt_x)
struct pOt__tag_3_COCT *pOt_x;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
(*pOt_x).pOt_qoffs=(pOt_INTEGER)(pOt_cslen_COCQ);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Unlink_COCQ
#if pOt__ANSI_C
(struct pOt__tag_3_COCT *pOt_x)
#else
(pOt_x)
struct pOt__tag_3_COCT *pOt_x;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
if(( (*pOt_x).pOt_qoffs==((pOt_INTEGER)(0)))) {
pOt_PutSeq_COCO(pOt__dup_arr(__FILE__,__LINE__,(pOt__ArrTypDsc**)&pOt_CSeq_COCQ));
pOt_Rewind_COCQ();
}
(*pOt_x).pOt_qoffs=(pOt_INTEGER)(-1);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Mark_COCQ
#if pOt__ANSI_C
(struct pOt__tag_3_COCT *pOt_x)
#else
(pOt_x)
struct pOt__tag_3_COCT *pOt_x;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
(*pOt_x).pOt_qoffs=(pOt_INTEGER)(pOt_cslen_COCQ);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Release_COCQ
#if pOt__ANSI_C
(struct pOt__tag_3_COCT *pOt_x)
#else
(pOt_x)
struct pOt__tag_3_COCT *pOt_x;
#endif
{
pOt_INTEGER pOt_i;
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt_cslen_COCQ=(pOt_INTEGER)((*pOt_x).pOt_qoffs);
if(( pOt_cslen_COCQ!=((pOt_INTEGER)(0)))) {
pOt_i=(pOt_INTEGER)(0);
for(;;) {
pOt_Dup_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, pOt_i)]=pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, (pOt_INTEGER)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_i),(pOt_LONGINT)(pOt_cslen_COCQ),5))];
if(((unsigned char) pOt_Dup_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, pOt_i)]==(unsigned char)'\0')) {
goto pOt__LoopLabel_1;
}
pOt_i+=(1);
}
pOt__LoopLabel_1:;
pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, pOt_cslen_COCQ)]='\0';
pOt_PutSeq_COCO(pOt__dup_arr(__FILE__,__LINE__,(pOt__ArrTypDsc**)&pOt_Dup_COCQ));
} else {
pOt_PutSeq_COCO(pOt__dup_arr(__FILE__,__LINE__,(pOt__ArrTypDsc**)&pOt_CSeq_COCQ));
pOt_CSeq_COCQ.arr[pOt__inxchk(__FILE__,__LINE__,0x1000, 0)]='\0';
}
(*pOt_x).pOt_qoffs=(pOt_INTEGER)(-1);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Dummy_COCQ()
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
if(( pOt_cslen_COCQ==((pOt_INTEGER)(0)))) {
pOt_Append_COCQ(pOt__dup_arr(__FILE__,__LINE__,(pOt__ArrTypDsc**)&(*pOt__set_str_td(&pOt__strcon_buf[0x0L],&pOt__str_td[0x1]))));
}
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
void pOt_COCQ__body()
{
static int pOt_COCQ__loaded=0;
if(!pOt_COCQ__loaded){
pOt_COCQ__loaded=1;
pOt_Strings__body();
pOt_COCS__body();
pOt_COCT__body();
pOt_COCO__body();
pOt__gc_ptrs.next=pOt__gc_root;
pOt__gc_root=(struct pOt__tag_gc_node*)&pOt__gc_strs;
pOt__init_var((pOt__TypDsc**)&pOt_CSeq_COCQ,(pOt__TypDsc*)&pOt__td_0_COCQ);
pOt__init_var((pOt__TypDsc**)&pOt_Dup_COCQ,(pOt__TypDsc*)&pOt__td_0_COCQ);
pOt__Epilogue:;
}
}